#pragma once 



class MyString
{
public:

	MyString();
	~MyString();
	MyString(char *p);
	MyString(int n);

	void Set(const char *pStr);
	void Set(int n);
	const char *Get() const;

	void ToUpper();
	void ToLower();

	void Release();		

	void Print(char *format, ...);

	static bool StringCompare(const char* string1, const char* string2);


	void operator= (const MyString& rStr);
	void operator= (const char *p);

	void operator+= (const char *p);
	void operator+= (const MyString& rStr);
	void operator+= (int n);
	void operator+ (int n);

	bool operator== (const MyString& rStr) const;

	MyString operator+ (const MyString& rStr);
	MyString operator+ (const char *p);


private:
	void Reset();
	int Digits(int n);

	void Concatenate(const MyString& pStr);
	void Concatenate(const char *pStr);	

	char *mpBuffer;
	unsigned int mSize;

	static const unsigned int PrintBufferLength = 1024;
	static char PrintBuffer[PrintBufferLength];
};